package com.smooth.dao.gen;

import com.smooth.dao.gen.bean.BizOffer;
import com.smooth.dao.gen.bean.BizOfferExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizOfferMapper {
    /** biz_offer */
    @SelectProvider(type=BizOfferSqlProvider.class, method="countByExample")
    long countByExample(BizOfferExample example);

    /** biz_offer */
    @DeleteProvider(type=BizOfferSqlProvider.class, method="deleteByExample")
    int deleteByExample(BizOfferExample example);

    /** biz_offer */
    @Delete({
        "delete from biz_offer",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /** biz_offer */
    @Insert({
        "insert into biz_offer (id, apply_id, ",
        "stu_id, stu_name, ",
        "sch_id, sch_name, ",
        "comp_id, comp_name, ",
        "offer_status, job_id, ",
        "job_name, offer_pdf, ",
        "com_time, create_date, ",
        "update_date)",
        "values (#{id,jdbcType=VARCHAR}, #{applyId,jdbcType=VARCHAR}, ",
        "#{stuId,jdbcType=VARCHAR}, #{stuName,jdbcType=VARCHAR}, ",
        "#{schId,jdbcType=VARCHAR}, #{schName,jdbcType=VARCHAR}, ",
        "#{compId,jdbcType=VARCHAR}, #{compName,jdbcType=VARCHAR}, ",
        "#{offerStatus,jdbcType=SMALLINT}, #{jobId,jdbcType=VARCHAR}, ",
        "#{jobName,jdbcType=VARCHAR}, #{offerPdf,jdbcType=VARCHAR}, ",
        "#{comTime,jdbcType=TIMESTAMP}, #{createDate,jdbcType=TIMESTAMP}, ",
        "#{updateDate,jdbcType=TIMESTAMP})"
    })
    int insert(BizOffer record);

    /** biz_offer */
    @InsertProvider(type=BizOfferSqlProvider.class, method="insertSelective")
    int insertSelective(BizOffer record);

    /** biz_offer */
    @SelectProvider(type=BizOfferSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="apply_id", property="applyId", jdbcType=JdbcType.VARCHAR),
        @Result(column="stu_id", property="stuId", jdbcType=JdbcType.VARCHAR),
        @Result(column="stu_name", property="stuName", jdbcType=JdbcType.VARCHAR),
        @Result(column="sch_id", property="schId", jdbcType=JdbcType.VARCHAR),
        @Result(column="sch_name", property="schName", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_id", property="compId", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_name", property="compName", jdbcType=JdbcType.VARCHAR),
        @Result(column="offer_status", property="offerStatus", jdbcType=JdbcType.SMALLINT),
        @Result(column="job_id", property="jobId", jdbcType=JdbcType.VARCHAR),
        @Result(column="job_name", property="jobName", jdbcType=JdbcType.VARCHAR),
        @Result(column="offer_pdf", property="offerPdf", jdbcType=JdbcType.VARCHAR),
        @Result(column="com_time", property="comTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<BizOffer> selectByExample(BizOfferExample example);

    /** biz_offer */
    @Select({
        "select",
        "id, apply_id, stu_id, stu_name, sch_id, sch_name, comp_id, comp_name, offer_status, ",
        "job_id, job_name, offer_pdf, com_time, create_date, update_date",
        "from biz_offer",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="apply_id", property="applyId", jdbcType=JdbcType.VARCHAR),
        @Result(column="stu_id", property="stuId", jdbcType=JdbcType.VARCHAR),
        @Result(column="stu_name", property="stuName", jdbcType=JdbcType.VARCHAR),
        @Result(column="sch_id", property="schId", jdbcType=JdbcType.VARCHAR),
        @Result(column="sch_name", property="schName", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_id", property="compId", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_name", property="compName", jdbcType=JdbcType.VARCHAR),
        @Result(column="offer_status", property="offerStatus", jdbcType=JdbcType.SMALLINT),
        @Result(column="job_id", property="jobId", jdbcType=JdbcType.VARCHAR),
        @Result(column="job_name", property="jobName", jdbcType=JdbcType.VARCHAR),
        @Result(column="offer_pdf", property="offerPdf", jdbcType=JdbcType.VARCHAR),
        @Result(column="com_time", property="comTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    BizOffer selectByPrimaryKey(String id);

    /** biz_offer */
    @UpdateProvider(type=BizOfferSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizOffer record, @Param("example") BizOfferExample example);

    /** biz_offer */
    @UpdateProvider(type=BizOfferSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizOffer record, @Param("example") BizOfferExample example);

    /** biz_offer */
    @UpdateProvider(type=BizOfferSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BizOffer record);

    /** biz_offer */
    @Update({
        "update biz_offer",
        "set apply_id = #{applyId,jdbcType=VARCHAR},",
          "stu_id = #{stuId,jdbcType=VARCHAR},",
          "stu_name = #{stuName,jdbcType=VARCHAR},",
          "sch_id = #{schId,jdbcType=VARCHAR},",
          "sch_name = #{schName,jdbcType=VARCHAR},",
          "comp_id = #{compId,jdbcType=VARCHAR},",
          "comp_name = #{compName,jdbcType=VARCHAR},",
          "offer_status = #{offerStatus,jdbcType=SMALLINT},",
          "job_id = #{jobId,jdbcType=VARCHAR},",
          "job_name = #{jobName,jdbcType=VARCHAR},",
          "offer_pdf = #{offerPdf,jdbcType=VARCHAR},",
          "com_time = #{comTime,jdbcType=TIMESTAMP},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BizOffer record);
}